/**********************************************************************
* File: location.h
* ID  : 
* Purpose: Delcare the prototype for class Location.
* Date   : 2004/04/19
* Author : T.S.Yo
* Description:
*    The class Location contains all information of a "room": 
*    it's ID, name, exits to 6 directions, points earned when first
*    enter, and short/long description of the location. 
*    Besides, methods to get and set the information are also provided.
**********************************************************************/

#ifndef LOCATION_H
#define LOCATION_H

#include <string>
#include "item.cpp"
#include "listlnk2.cpp"

using namespace std;

class Map;

class Location
{
    public:
    // Constructor
        Location();
    // Destructor
        ~Location(); 
        
    // Get Data Member
       int getKey() const;
       int getID();
       int getExit(const char &direction);
       int getPoint();
       bool getAccessed();
       string getName();
       string getSDescr();
       string getLDescr();
       void showItemList();

    // Set Data Member
       void setID(const int &newID);
       void setExit(const int &newExit, const char &direction);
       void setName(const string &newName);
       void setAccessed(const bool &newAccessed);
       void setPoint(const int &newPoint);
       void setSDescr(const string &newSDescr);
       void setLDescr(const string &newLDescr);
       void addItem(const Item &newItem);
       void dropItem(const string &itemName);
       
     // Access itemList
       bool searchItem(const string &itemName, Item &searchItem);
        
    private:
        int    ID;                    // ID of the location
        int    exit[6],               // Exits to 6 direction
               point;                 // Points earned when first enter
        bool   accessed;              // Flag of first enter
        string name;                  // Name of the location
        string sDescr;                // Short description of the location
        string lDescr;                // Long description of the location
        List<Item,string> itemList;   // Items in this location

};

#endif  //#ifndef LOCATION_H

